@main-color: #0092ff;
@gray-8: #2d3748;
@gray-7: #4a5568;
@gray-6: #718096;
@gray-5: #a0aec0;
@gray-4: #cbd5e0;
@gray-3: #e2e8f0;
@gray-2: #edf2f7;
@gray-1: #f7fafc;
@error: rgb(255, 42, 42);
@success: #34de2b;
@warning: rgb(255, 204, 0);
@black: #000;
@white: #fff;

#app {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  width: 100%;
  height: 100%;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 3px;
  -webkit-box-shadow: inset 0 0 5px rgb(0 21 41 / 5%);
}

::-webkit-scrollbar-track {
  background: hsla(0, 0%, 100%, 0.15);
  border-radius: 3px;
  -webkit-box-shadow: inset 0 0 5px #2525250d;
}

* {
  box-sizing: border-box;
}

h1 {
  font-size: 2.2rem;
}

h2 {
  font-size: 1.65rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
}

h3 {
  font-size: 1.35rem;
}

a.header-anchor {
  font-size: 0.85em;
  float: left;
  margin-left: -0.87em;
  padding-right: 0.23em;
  margin-top: 0.125em;
  opacity: 0;
}

a.header-anchor:hover {
  text-decoration: none;
}

code,
kbd {
  font-family: source-code-pro, Menlo, Monaco, Consolas, Courier New, monospace;
}

ol,
p,
ul {
  line-height: 1.7;
  color: @gray-7;
}

table {
  border-collapse: collapse;
  margin: 1rem 0;
}

tr {
  border-top: 1px solid #dfe2e5;
}

tr:nth-child(2n) {
  background-color: #f6f8fa;
}

td,
th {
  border: 1px solid #dfe2e5;
  padding: 0.6em 1em;
}

ul,
ol {
  padding-left: 1.2em;
}

// ul,
// li {
//   padding: 0;
//   margin: 0;
//   list-style-type: none;
// }

a,
p a code {
  color: @main-color;
  text-decoration: none;
}

.logo {
  display: inline-block;
  min-width: 2rem;
  font-size: 22px;
  font-weight: bold;
  font-family: Raleway;
  color: @gray-8;
  z-index: 100;
}

.fp-doc {
  display: flex;
  align-items: stretch;
  margin-bottom: 0px;
  margin-left: 0px;
  margin-right: 0px;
  margin-top: 0px;
  min-height: 0px;
  min-width: 0px;
  padding-bottom: 0px;
  padding-left: 0px;
  padding-right: 0px;
  padding-top: 0px;
  position: relative;
  flex-direction: column;
  z-index: 0;
  flex: 1;
}

.fp-tree-footer {
  color: #a0aec0;
  height: 64px;
  line-height: 64px;
  font-size: 0.875rem;
  padding: 0 20px;
  text-align: center;
  background-color: linear-gradient(rgba(249, 250, 252, 10), rgba(249, 250, 252, 1));
}

.sidebar-group,
.sidebar-anchor-group {
  a.sidebar-link:hover {
    color: @main-color;
  }

  a.sidebar-link.active {
    font-weight: 600;
    color: @main-color;
    border-left-color: @main-color;
  }
}

.sidebar-link {
  margin-left: -10px;
  margin: 0;
  padding: 0;
  color: @gray-7;
  // border-left: 1px solid #e2e8f0;
}

.sidebar-group {
  margin: 1em 0;
  position: relative;
  list-style-type: none;

  ul {
    margin: 0;
    padding: 0;
  }

  li {
    padding-left: 12px;
    line-height: 2rem;
    list-style-type: none;
  }

  .sidebar-heading {
    color: @gray-8;
    transition: color 0.15s ease;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 700;
    padding-left: 0rem;
    margin-top: 1rem;
    line-height: 2rem;
    margin-bottom: 0.5rem;
    position: relative;
    a {
      color: @gray-8;
      padding: 10px;
      padding-left: 0;
    }

    &::before {
      position: absolute;
      top: 32px;
      bottom: 0;
      width: 1px;
      background-color: #e2e8f0;
      content: '';
    }

    &::after {
      position: absolute;
      width: 12px;
      height: 12px;
      background-image: url();
      background-repeat: no-repeat;
      background-size: contain;
      top: 50%;
      right: 0;
      margin-top: -6px;
      content: '';
      transition: all 0.2s;
      transform-origin: center;
    }

    &.close {
      &::after {
        transform: rotate(180deg);
      }
    }
  }

  .sidebar-group-items {
    transition: all 0.2s ease-in;
    overflow: hidden;
    &.close {
      max-height: 0 !important;
    }
  }
}

.sidebar-anchor-link {
  max-width: 300px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: @gray-6;
}

.sidebar-anchor-group {
  margin: 0.75em 0;
  list-style: none;

  ul {
    margin: 0;
    padding: 0;
  }

  li {
    padding-left: 10px;
    color: @gray-6;
    font-size: 0.875rem;
    list-style: none;
  }

  .sidebar-anchor-link:hover {
    color: @main-color;
  }

  .sidebar-anchor-link {
    display: block;
    position: relative;
    &.active {
      font-weight: 600;
      color: @main-color;
      // border-left-color: @main-color;
      // border-left: 1px solid;
      &::before {
        position: absolute;
        left: 0;
        height: 23px;
        width: 1px;
        background-color: @main-color;
        content: '';
        height: 100%;
      }

      &.level_1 {
        &::before {
          left: -10px;
        }
      }
      &.level_2 {
        &::before {
          left: -30px;
        }
      }
      &.level_3 {
        &::before {
          left: -50px;
        }
      }
      &.level_4 {
        &::before {
          left: -70px;
        }
      }
      &.level_5 {
        &::before {
          left: -90px;
        }
      }
      &.level_6 {
        &::before {
          left: -110px;
        }
      }
    }
  }

  .sidebar-anchor-heading {
    color: @gray-8;
    transition: color 0.15s ease;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 700;
    padding-left: 0rem;
    margin-top: 1rem;
    line-height: 2rem;
    margin-bottom: 0.5rem;
  }

  .sidebar-anchor-group-items {
    transition: height 0.1s ease-out;
    // border-left: 1px solid #eaecef;
  }
}

.fp-doc-navbar {
  box-shadow: 0px 4px 10px rgb(0 0 0 / 5%);
  border-bottom-width: 1px;
  border-bottom-color: rgba(211, 220, 228, 1);
  background-color: rgba(255, 255, 255, 1);
  flex-shrink: 0;
  display: flex;
  flex-basis: auto;
  flex-shrink: 0;
  position: relative;

  height: 64px;
  z-index: 10000;
}

.fp-doc-logo {
  justify-content: flex-end;
  width: ~'max(300px, ((100vw - 920px) / 2) - 0px)';
  display: flex;
  align-items: center;
  .logo {
    width: 300px;
    padding-left: 36px;
    text-align: left;
  }
}

.fp-doc-container {
  flex-direction: row;
  flex-shrink: 1;
  flex-grow: 1;
  flex-basis: 0%;
  align-items: stretch;
  border: 0 solid black;
  box-sizing: border-box;
  display: flex;
  z-index: 0;
  min-height: 0px;
  min-width: 0px;
}

.fp-doc-tree {
  width: ~'max(300px, ((100vw - 920px) / 2) - 0px)';
  display: flex;
  justify-content: flex-end;
  background-color: rgba(226, 232, 240, 0.2);
  border-right: 1px solid #e2e8f0;
  align-items: stretch;
  min-height: 0px;
  min-width: 0px;
  transition: all 0.2s ease-in-out;
  transform: translate(0, 0);
  z-index: 1000;
  height: 100%;

  .fp-tree-links {
    display: flex;
    width: 300px;
    flex-shrink: 0;
    flex-direction: column;
    flex-basis: auto;
    align-items: stretch;
    min-width: 0;
    min-height: 0px;
  }
  .fp-tree-node-wrap {
    overflow-y: auto;
    overflow-x: hidden;
    padding-left: 24px;
    padding-right: 20px;
    padding-top: 20px;
    flex-shrink: 1;
    flex-grow: 1;
    flex-basis: 0%;
  }

  &.fp-focus-tree {
    .default {
      display: none;
      .sidebar-group,
      .sidebar-heading {
        display: none;

        li {
          padding-left: 0;
        }
      }
    }

    .focus-broder {
      margin: 0;
      .sidebar-heading,
      .group-link-item {
        display: none;
      }
      li {
        padding-left: 0;
      }
    }

    .focus-last.focus-last {
      .sidebar-group,
      .sidebar-heading,
      .group-link-item {
        display: block;
      }
      li {
        padding-left: 12px;
      }
    }
  }
}

.fp-hide-tree {
  width: 0;
  transform: translate(-100%, 0);
}

.fp-menu-icon-wrap {
  width: 0;
  margin-right: 0;
  overflow: hidden;
  transition: all 0.2s;
}
.fp-menu-icon {
  display: -ms-flexbox;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  transition: all 0.3s;
  display: flex;

  .fp-menu-line {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background-color: @black;
    transition: all 0.3s ease-in-out;

    & + .fp-menu-line {
      margin-top: 4px;
    }
  }

  &.close {
    border-radius: 50%;
    background-color: rgba(55, 113, 228, 0.1);
    .fp-menu-line {
      background-color: @main-color;
      width: 14px;
    }

    .fp-menu-line:first-child {
      transform: translateY(6px) rotate(45deg);
    }

    .fp-menu-line:nth-child(2) {
      opacity: 0;
    }

    .fp-menu-line:nth-child(3) {
      transform: translateY(-6px) rotate(-45deg);
    }
  }
}

.fp-doc-main {
  flex-shrink: 1;
  flex-grow: 1;
  flex-basis: 0%;
  display: flex;
  min-height: 0px;
  min-width: 0px;

  .fp-doc-main-wrap {
    transform: translateZ(0px);
    overflow-y: auto;
    scroll-behavior: smooth;
    overflow-x: hidden;
    flex-shrink: 1;
    flex-grow: 1;
    flex-basis: 0%;
    align-items: stretch;
    min-height: 0px;
    min-width: 0px;
    display: flex;
  }

  .fp-doc-body {
    flex-shrink: 1;
    flex-grow: 1;
    flex-basis: 0%;
    justify-content: center;
    min-height: 0px;
    min-width: 0px;
    .content {
      margin: 0 80px;
      max-width: 920px;

      * {
        max-width: 100%;
      }
    }
  }

  .fp-doc-anchor {
    width: ~'max(220px, calc(100vw - max(300px, calc((100vw - 920px) / 2 - 0px)) - 750px - 80px - 80px - 0px));';
    max-width: max(50%, 300px);
    top: 24px;
    position: sticky;
    max-height: calc(100vh - 88px);
    align-self: flex-start;
    overflow-y: auto;
    padding-bottom: 24px;
    margin-bottom: 24px;
    margin-top: 24px;
    min-height: 0px;
    min-width: 0px;
    padding-right: 20px;

    flex-shrink: 0;
    flex-basis: auto;
  }

  code {
    color: #476582;
    padding: 0.25rem 0.5rem;
    margin: 0;
    font-size: 0.85em;
    background-color: rgba(27, 31, 35, 0.05);
    border-radius: 3px;
  }
}

code[class*='language-'],
pre[class*='language-'] {
  color: #ccc;
  background: none;
  font-family: Consolas, Monaco, Andale Mono, Ubuntu Mono, monospace;
  text-align: left;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  word-wrap: normal;
  line-height: 1.5;
  -moz-tab-size: 4;
  -o-tab-size: 4;
  tab-size: 4;
  -webkit-hyphens: none;
  -ms-hyphens: none;
  hyphens: none;
}

pre[class*='language-'] {
  padding: 1em;
  margin: 0.5em 0;
  overflow: auto;
}

:not(pre) > code[class*='language-'],
pre[class*='language-'] {
  background: #2d2d2d;
}

:not(pre) > code[class*='language-'] {
  padding: 0.1em;
  border-radius: 0.3em;
  white-space: normal;
}

.content pre,
.content pre[class*='language-'] {
  background-color: #282c34;
  line-height: 1.4;
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  margin: 0.85rem 0;
  white-space: pre-wrap;
  word-break: break-word;
  overflow: auto;
  position: relative;
}

.content pre[class*='language-'] code,
.content pre code {
  color: #fff;
  padding: 0;
  background-color: none;
  border-radius: 0;
}

.content pre:before,
.content pre[class*='language-']:before {
  position: absolute;
  top: 0.8em;
  right: 1em;
  font-size: 0.75rem;
  color: hsla(0, 0%, 100%, 0.4);
}

.content .highlighted-line {
  background-color: rgba(0, 0, 0, 0.66);
  display: block;
  margin: 0.1rem -1.5rem 0;
  padding: 0.1rem 1.8rem;
}

pre[class='language-javascript']:before,
pre[class='language-js']:before {
  content: 'js';
}

pre[class='language-html']:before,
pre[class='language-markup']:before {
  content: 'html';
}

pre[class='language-markdown']:before,
pre[class='language-md']:before {
  content: 'md';
}

pre[class='language-vue']:before {
  content: 'vue';
}

pre[class='language-css']:before {
  content: 'css';
}

pre[class='language-sass']:before {
  content: 'sass';
}

pre[class='language-less']:before {
  content: 'less';
}

pre[class='language-scss']:before {
  content: 'scss';
}

pre[class='language-stylus']:before {
  content: 'stylus';
}

pre[class='language-json']:before {
  content: 'json';
}

pre[class='language-ruby']:before {
  content: 'rb';
}

pre[class='language-python']:before {
  content: 'py';
}

pre[class='language-go']:before {
  content: 'go';
}

pre[class='language-java']:before {
  content: 'java';
}

pre[class='language-c']:before {
  content: 'c';
}

pre[class='language-bash']:before {
  content: 'sh';
}

.content:not(.custom) {
  max-width: 740px;
  margin: 0 auto;
  padding: 0rem 0rem 10rem 0rem;
}

.content:not(.custom) > :first-child {
  margin-top: 3.6rem;
}

.content:not(.custom) a:hover {
  text-decoration: underline;
}

.content:not(.custom) p.demo {
  padding: 1rem 1.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.content:not(.custom) img {
  max-width: 100%;
}

.content.custom {
  padding: 0;
  margin: 0;
}

// p{
//   color: @gray-8;
// }

a {
  // font-weight: 500;
  text-decoration: none;
}

a,
p a code {
  // color: @main-color;
}

p a code {
  font-weight: 400;
}

kbd {
  background: #eee;
  border: 0.15rem solid #ddd;
  border-bottom: 0.25rem solid #ddd;
  border-radius: 0.15rem;
  padding: 0 0.15em;
}

blockquote {
  font-size: 1.2rem;
  color: @gray-5;
  border-left: 0.25rem solid #e2e8f0;
  margin-left: 0;
  padding-left: 1rem;
}

strong {
  font-weight: 600;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.25;
  color: @gray-8;
}

.content:not(.custom) > h1,
.content:not(.custom) > h2,
.content:not(.custom) > h3,
.content:not(.custom) > h4,
.content:not(.custom) > h5,
.content:not(.custom) > h6 {
  margin-top: -3.1rem;
  padding-top: 4.6rem;
  margin-bottom: 0;
}

.content:not(.custom) > h1:first-child,
.content:not(.custom) > h2:first-child,
.content:not(.custom) > h3:first-child,
.content:not(.custom) > h4:first-child,
.content:not(.custom) > h5:first-child,
.content:not(.custom) > h6:first-child {
  margin-top: -1.5rem;
  margin-bottom: 1rem;
}

.content:not(.custom) > h1:first-child + .custom-block,
.content:not(.custom) > h1:first-child + p,
.content:not(.custom) > h1:first-child + pre,
.content:not(.custom) > h2:first-child + .custom-block,
.content:not(.custom) > h2:first-child + p,
.content:not(.custom) > h2:first-child + pre,
.content:not(.custom) > h3:first-child + .custom-block,
.content:not(.custom) > h3:first-child + p,
.content:not(.custom) > h3:first-child + pre,
.content:not(.custom) > h4:first-child + .custom-block,
.content:not(.custom) > h4:first-child + p,
.content:not(.custom) > h4:first-child + pre,
.content:not(.custom) > h5:first-child + .custom-block,
.content:not(.custom) > h5:first-child + p,
.content:not(.custom) > h5:first-child + pre,
.content:not(.custom) > h6:first-child + .custom-block,
.content:not(.custom) > h6:first-child + p,
.content:not(.custom) > h6:first-child + pre {
  margin-top: 2rem;
}

@media (max-width: 1430px) {
  .fp-doc-anchor {
    display: none;
  }
}

@media (max-width: 700px) {
  .fp-doc-tree {
    position: fixed;
    background-color: #fff;
    transform: translate(-100%, 0);

    &.fp-open-tree {
      transform: translate(0, 0);
    }
  }
  .fp-doc-body {
    .content.content {
      margin: 0 16px;
    }
  }

  .fp-menu-icon-wrap {
    width: auto;
    margin-left: 1em;
  }
}

@media (max-width: 419px) {
  h1 {
    font-size: 1.9rem;
  }

  .content:not(.custom) {
    padding: 1.5rem;
  }

  .content pre,
  .content pre[class*='language-'] {
    margin: 0.85rem -1.5rem;
    border-radius: 0;
  }
}
